/**
 * 生成指定长度的由数字大小英文字母组成的随机字符串
 *
 * @param length 长度
 * @returns {string} 随机字符串
 */
export function randomString(length) {
    let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    let result = '';
    for (let i = 0; i < length; i++) {
        result += characters.charAt(Math.floor(Math.random() * characters.length));
    }
    return result;
}